import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-ihrm-token'
const TokenTimeStamp = 'hrsaas-ihrm-TokenTimeStamp'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export const getTokenTimeStamp = () => Cookies.get(TokenTimeStamp)

export const setTokenTimeStamp = () => {
  Cookies.set(TokenTimeStamp, Date.now())
}

